package com.wxg.other.collections;

/**
 * 示例来自“ON JAVA 中文版”基础卷 ch12.11 新特性：记录（record）类型
 */

interface Star {
    double brightness();

    double density();
}

// record 可以实现 interface

record RedDwarf(double brightness) implements Star {
    @Override
    public double density() {
        return 100.0;
    }
}